home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 1 / MacMania 1.toast / Games / • Strategy • / Robot Battle 1.1d / Kelly next >
Text File  |  1991-04-21  |  812b  |  55 lines

  1. `  Kelly the Karunkle.  A good robot to demonstrate many of the
  2. `  new language features of RB v1.1.
  3.  
  4. Equip 1 0 0 0 0 400
  5.  
  6. Setshields 0 1 2 1 0 0 0 0 
  7.  
  8. let left=0-1
  9. let right=1
  10.  
  11. turn left
  12. turn left
  13.  
  14. engineon
  15.  
  16. `  If we don't set up these temporaries variables xtemp and ytemp,
  17. `  we'll only get halfway to the edges of the screen.  This is 
  18. `  because XCOORD and YCOORD change as we move.  Therefore, we
  19. `  record the initial values of X & YCOORD in the temps and use 
  20. `  those instead since they don't change.
  21.  
  22. let xtemp = XCOORD
  23. for i=1 to xtemp
  24.   wait 1
  25. next
  26.  
  27. engineoff
  28.  
  29. turn right
  30. turn right
  31.  
  32. engineon
  33.  
  34. let ytemp = YCOORD
  35. for i=1 to ytemp
  36.   wait 1
  37. next
  38.  
  39. engineoff
  40. swivel 90
  41. turn right
  42.  
  43. for i=1 to 10
  44.   for j=1 to 18
  45.     swivel 5
  46.     zap
  47.   next
  48.   turn right
  49.   engineon
  50.   wait 73
  51.   engineoff
  52.   turn right
  53. next
  54.  
  55.